<template lang="pug">
  div#UserCollection
    div.top-header
      i.iconfont.icon-fanhui(@click="$router.push('/wode')")
      span.top-header-title 我的收藏
    div.picture-column
      pictureColumn(:columnData="columnData",@showLike="showLike",@toShare="toShare")
</template>
<script>
  import pictureColumn from '@/components/pictureColumn.vue'

  export default {
    data() {
      return {
        columnData: [{
          columnImg: require('@/assets/search/column01.png'),
          columnText: '夜跑100天',
          likeNumber: 12,
          ifLike: false
        }, {
          columnImg: require('@/assets/search/column02.png'),
          columnText: '发现身边的美',
          likeNumber: 65,
          ifLike: true
        }, {
          columnImg: require('@/assets/search/column03.png'),
          columnText: '发现身边的美',
          likeNumber: 65,
          ifLike: false
        }, {
          columnImg: require('@/assets/search/column02.png'),
          columnText: '发现身边的美',
          likeNumber: 65,
          ifLike: true
        }, {
          columnImg: require('@/assets/search/column03.png'),
          columnText: '发现身边的美',
          likeNumber: 65,
          ifLike: false
        }]
      }
    },
    methods: {
      showLike(index) {
        if (!this.columnData[index].ifLike) {
          this.columnData[index].ifLike = true
          this.columnData[index].likeNumber++
        }
      },
      toShare(index) {
        alert('分享')
      }
    },
    components: {
      pictureColumn
    }
  }
</script>
<style scoped lang="less">
</style>
